/**
 * Package Name:cn.com.guodiantong.common.controller
 * Date:2017年8月15日 下午4:13:13
 * Copyright (c) 2017 mr.luoxing@gmail.com Rights Reserved.
 *
 */

package cn.com.guodiantong.common.controller;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.com.guodiantong.common.api.service.ILoggerService;

/**
 * @ClassName: LoggerController.<br/>
 * @Description: TODO(...).<br/>
 *
 * @author Mr.Luoxing
 * @version 1.0.0
 */
@RestController
@RequestMapping("/logger")
public class LoggerController {

	@Autowired
	ILoggerService loggerService;
	
	@GetMapping("{id}")
	public Object detail(@PathVariable String id) {
		return loggerService.selectByPrimaryKey(id);
	}
	

	@SuppressWarnings("rawtypes")
	@GetMapping("list")
	public List list() {
		HashMap<String,Object> param = new HashMap<>();
		param.put("type", 1);
		return loggerService.list(param);
	}
}

